package com.dxy.hms.mapper;

import com.dxy.hms.model.entity.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 用户角色关联表 Mapper 接口
 * </p>
 *
 * @author dxy
 * @since 2024-09-24
 */
@Mapper
public interface UserRoleMapper {

    void delByUserId(Long userId);

    void delByRoleId(Long roleId);

    void delByUserIdAndNotInRoleIds(@Param("userId")Long userId, @Param("roleIdList")List<Long> roleIdList);

    void addOrIgnore(UserRole entity);

    void addOrIgnoreBatch(List<UserRole> entityList);
}
